a = float(input("Please input the shangdi : "))
b = float(input("Please input the xiadi : "))
h = float(input("Please input the gao : "))

print('%.2f'%((a+b)*h/2))